package com.letoken.platform.repo.admin.req.config;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * @author wyl
 * @date 2022/12/10
 */
@Data
@ApiModel(value = "新增公告配置请求对象", description = "新增公告配置请求对象")
public class AddAnnouncementReq {


    @ApiModelProperty(name = "cate", value = "分类", example = "1")
    private Integer cate;

    @NotNull(message = "公告标题不能为空")
    @ApiModelProperty(name = "title", value = "公告标题", example = "三八妇女节快乐！！！", required = true)
    private String title;

    @ApiModelProperty(name = "content", value = "公告内容", example = "<h1>我宣布个事，我是**</h1>")
    private String content;

    @ApiModelProperty(name = "lang", value = "语言文字", example = "cn")
    private String lang;

    @ApiModelProperty(name = "pid", value = "父标题id", example = "0")
    private Long pid;

    @ApiModelProperty(name = "isShow", value = "是否展示", example = "true")
    private Boolean isShow;

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(name = "isShow", value = "开始时间", required = true, example = "2020-09-25 21:35:53")
    private LocalDateTime publishTime;

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(name = "sendTime", value = "结束时间", example = "2020-10-01 21:35:53")
    private LocalDateTime expireTime;


}
